﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using DataServer.Models;

namespace DataServer.Controllers
{
    public class TablesController : ApiController
    {
        private DataHelper _helper = new DataHelper();
        // GET api/table
        public List<string> Get()
        {
            //return new string[] { "value1", "value2" };
            return _helper.getAllTableNames();
        }

        // GET api/table/NHANVIEN
        public List<string> Get(string id)
        {
            return _helper.getColumnNames(id);
        }

        // POST api/table
        public void Post([FromBody]string value)
        {
        }

        // PUT api/table/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/table/5
        public void Delete(int id)
        {
        }
    }
}
